﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoodsSlideshowInfo.aspx.cs"
    Inherits="MicroGoodsInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>商品登记</title>
    <link href="../Inc/Style/Style.css" rel="stylesheet" type="text/css" />


    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/Module/Common/Common.js" type="text/javascript"></script>

    <link href="../Inc/artDialogskins/blue.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.artDialog.basic.js" type="text/javascript"></script>

    <link href="../Inc/Style/uploadify.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.uploadify.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.uploadify.swfobject.js" type="text/javascript"></script>
    <script src="../Scripts/Module/StockManage/GoodsSlideshowInfo.js"></script>
    <script src="../Scripts/jquery-common.js" type="text/javascript"></script>

    <%--<script src="../Scripts/Module/MicroWebsite/MicroGoodsInfo.js" type="text/javascript"></script>--%>
    <style type="text/css">
        .uploadifyQueueItem {
            width: 160px;
        }

        .uploadifyProgress {
            width: 80%;
        }

        .fileName {
            width: 0px;
            height: 0px;
            display: block;
            overflow: hidden;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {

            $("#GoodsSlideshow_Uploadify").uploadify({
                'uploader': "../images/swf/uploadify.swf",
                'script': "../Service/MicroWebsiteUpload.ashx",
                'cancelImg': "../images/member/cancel.png",
                'folder': "../Upload/MicroWebsite/MicroGoods",
                'queueID': 'Goods_fileQueue',
                'buttonImg': "../images/member/selectImg.jpg",
                'height': 25,
                'width': 70,
                'fileExt': "*.jpg;*.jpeg;*.gif;*.png;*.bmp",
                'fileDesc': "请选择格式为GIF、JPG、PNG或BMP的图片",
                'fileDataName': "MicroGoods",
                'auto': true,
                'multi': true,
                'method': 'get',
                'sizeLimit': 512000,
                'onError': function (event, ID, fileObj, errorObj) {
                    if (errorObj.type == "File Size")
                        alert("对不起，上传的图片不能超过500K");
                    else
                        alert(errorObj.type + ' Error: ' + errorObj.info);
                },
                'onComplete': function (event, ID, fileObj, response, data) {
                    if (response.length > 1) {
                        var str = $("#txtUpdateGoodsName").val();
                        str = str == "" || str == undefined ? response : str + "," + response;
                        $("#txtUpdateGoodsName").val(str);
                        $("#imgGoodsPhoto").attr("src", "../Upload/MicroWebsite/MicroGoods/" + response + "?" + GetGuid());
                    }
                },
                'onSelect': function (event, queueID, fileObj) {
                    $("#GoodsSlideshow_Uploadify").uploadifySettings('scriptData', { 'name': $("#MerchantPhoto").val() });
                }
            });
        })
    </script>
</head>

<body>
    <form id="frmGoodsInfo" runat="server">
        <div class="system_Info box_right">
            <div class="system_Top">
                <div class="user_regist_title">
                    <asp:Literal runat="server" ID="ltlTitle"></asp:Literal>
                </div>
            </div>

            <div class="user_regist_Allleft" style="min-height: 400px;">
                <div class="user_regist_left">
                    <div class="user_regist_infor">
                        轮播图
                            
                    </div>
                        <asp:Repeater runat="server" ID="gvGoodsSlideshowList">
                            <ItemTemplate>
                                <tr class="td">
                                    
                                    <td style="text-align: left">
                                        <span onclick='ShowPic("<%#Eval("GoodsSlideshow_img") %>")' style="cursor: pointer;">
                                            <img  alt="" runat="server" src='<%#Eval("GoodsSlideshow_img") %>' onerror="this.src='../images/Gift/nogift.jpg'"
                                                style="width: 50px; height: 50px;" />
                                        </span>
                                    </td>
                                    <td class="listtd" style="width: 90px;">
                                        <a href="javascript:;" onclick='btnGoodsSlideshowDel("<%#Eval("GoodsSlideshowID") %>")' style="cursor: pointer;">
                                            <img src="../images/Gift/del.png" alt="删除" title="删除" /></a>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>


                </div>
            </div>
            <%--<div style="float: left; margin-left: 10px;">
                <table border="1" cellpadding="0" cellspacing="0" bordercolor="#434343" class="tableStyle">
                    <tr>
                        <th class="tableStyle_left" style="text-align: center;">商品相片
                        </th>
                    </tr>
                    <tr>
                        <td>
                            <div>
                                <img alt="" id="imgGoodsPhoto" src="../images/Gift/nogift.jpg" style="width: 200px; height: 200px;" runat="server" onerror="javascript:this.src='../images/Gift/nogift.jpg'" /><br />
                                <span style="color: gray">相片支持大小为150*150</span>
                                <input type="hidden" id="txtGoodsPhoto" runat="server" />
                            </div>
                            <div style="margin-top: 10px; height: 30px; text-align: center;">
                                <div style="width: 83px; height: 25px; float: left; margin-left: 20px;">
                                    <input id="GoodsSlideshow_Uploadify" type="file" style="display: none;" class="buttonColor" />
                                </div>
                                <div>
                                                                   <input id="btnGoodsSlideshowSave" type="button" class="common_Button" value="保　存" />
                                <input type="hidden" name="txtGoodsID" id="txtGoodsID" runat="server" />
                                <input type="hidden" name="txtUpdateGoodsName" id="txtUpdateGoodsName" runat="server" />
                                    <input id="btnGoodsPhotoUpload" type="button" class="common_Button" value="上传图片" onclick="javascript: $('#GoodsSlideshow_Uploadify').uploadifyUpload();" />
                                </div>
                            </div>
                            <div id="Goods_fileQueue">
                            </div>
                        </td>
                    </tr>
                </table>
            </div>--%>
        </div>
    </form>
</body>
</html>
